<!-- 入驻列表 -->
<style>
    th {
        text-align: center;
    }

    .table>tbody>tr>td {
        line-height: 60px;
        text-align: center;
        height: 50px;
        margin: 0px;
    }
</style>
<!-- css -->
<link href="__PUBLIC__/ganged/Css/bootstrap.css" rel="stylesheet" type="text/css" />

<div id="data_page" class="in_page">
    <table class="table table-striped table-bordered table-condensed ">
        <thead>
            <tr>
                <th>店铺</th>
                <th>职位</th>
                <th>姓名</th>
                <th>电话</th>
                <th>年龄</th>
                <th>地址</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <volist name="list" id="li">
                <tr>
                    <td>{$li.shop_name}</td>
                    <td>{$li.position}</td>
                    <td>{$li.user_name}</td>
                    <td>{$li.phone}</td>
                    <td>{$li.age}</td>
                    <td>{$li.address}</td>
                    <td>
                        <a href="{:U('wages', ['id'=>$li['id']])}">
                            <button type="button" class="btn btn-sm btn-primary">工资</button>
                        </a>
                        <a href="{:U('edit',array('id'=>$li['id']))}">
                            <button type="button" class="btn btn-sm btn-success">修改</button>
                        </a>
                        <button type="button" class="btn btn-sm btn-danger del" d_id="{$li.id}">删除</button>
                    </td>
                </tr>
            </volist>
        </tbody>
    </table>
</div>
<div>{$page}</div>

<style>
    #img {
        width: 700px;
        height: 550px;
        position: absolute;
        top: 5%;
        left: 20%;
        background-color: #FFFFFF;
        border-radius: 10px;
        box-shadow: 10px 10px 10px 5px #888888;
    }

    #order {
        width: 100px;
        height: 20px;
        display: block;
    }

    #Stick {
        width: 500px;
        height: 300px;
        position: absolute;
        top: 5%;
        left: 20%;
        background-color: #FFFFFF;
        border-radius: 10px;
        box-shadow: 10px 10px 10px 5px #888888;
    }

    #tuichu {
        position: absolute;
        right: 0px;
        bottom: 0px;
    }
</style>
<script>
    $(function () {
        //删除店铺
        $(".del").click(function (obj) {
            $_this = $(this);
            var id = $(this).attr("d_id");
            if (confirm("您确认删除吗?")) {
                $.post("{:U('del')}", { 'id': id }, function (obj) {
                    alert(obj.m);
                    if (obj.s) {
                        $_this.parent().parent().remove();
                        // if(typeof(obj.url) != undefined && obj.url){
                        //     location.href = obj.url;
                        // }
                    }
                })
            }
            return false;
        })
        $(".ajax-post").click(function (t) {
            var $this = $(t);
            var url = $this.attr('href');
            if ($this.hasClass('confirm')) {
                if (confirm($this.data('original-title'))) {

                }
            } else {
                $.post(url, {}, function (obj) {
                    if (obj.status) {
                        if (typeof (obj.url) != 'undefined' && obj.url) {
                            location.href = obj.url;
                        }
                    } else {
                        alert(obj.info);
                    }
                })
            }
            return false;
        })
    })
</script>